<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;

class UploaderController extends Controller{
    public function index(Request $request){
        $path = $request->file('file')->store($request->input('path','common'));
        
        return [
            'code'=>200,
            'msg'=>'成功',
            'data'=>[
                'file_url'=>'http://pic.knowledgebird.cn/'.$path
            ]
        ];
    }
}